package Listeners;

import gui.PanelGraphe;
import gui.PanelPrompt;

import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;

import javax.swing.JPanel;

public class StopMouseListener implements MouseListener {

	private PanelPrompt prompt;
	private PanelGraphe graphe;

	public StopMouseListener(JPanel parent) {

		JPanel grandParent = (JPanel) parent.getParent();
		prompt = (PanelPrompt) grandParent.getComponent(2);
		graphe = (PanelGraphe) grandParent.getComponent(0);
	}
	
	public void mouseClicked(MouseEvent e) {
		graphe.stop();
	}

	public void mouseEntered(MouseEvent e) {
		// TODO Auto-generated method stub

	}

	public void mouseExited(MouseEvent e) {
		// TODO Auto-generated method stub

	}

	public void mousePressed(MouseEvent e) {
		// TODO Auto-generated method stub

	}

	public void mouseReleased(MouseEvent e) {
		// TODO Auto-generated method stub

	}

}
